home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
pasclern.zip
/
FORWARD.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1993-04-01
|
554b
|
26 lines
PROGRAM forward_reference_example;
VAR number_of_times : INTEGER;
PROCEDURE write_a_line(VAR count : INTEGER); FORWARD;
PROCEDURE decrement(VAR index : INTEGER);
BEGIN
index := index - 1;
IF index > 0 THEN
write_a_line(index);
END;
PROCEDURE write_a_line;
BEGIN
WRITELN('The value of the count is now ',count:4);
decrement(count);
END;
BEGIN (* main program *)
number_of_times := 7;
decrement(number_of_times);
WRITELN;
number_of_times := 7;
write_a_line(number_of_times);
END. (* of main program *)